1. Field of the Invention
The present invention relates to a multiplier, particularly to a multiplier which has a digit rounding function.
2. Description of the Prior Arts
A conventional multiplier having a digit rounding function is now described with reference to FIG. 1. FIG. 1 shows a constitution of a prior-art multiplier (arithmetic operator) with a digit rounding function. As shown in FIG. 1, a multiplier 63 multiplies X61 and Y62 which represent two's complement numbers of 16 bits. In accordance with a value of a digit rounding selection signal 66, a selection circuit 65 emits a 32-bit output "00008000" or "00000000" (hexadecimal indication). An adder 64 adds the output (32 bits) of the multiplier 63 and the output of the selection circuit 65.
To round a digit of a multiplication result, the multiplier 63 obtains a result of multiplication of inputs X61 and Y62, the selection circuit 65 selects the 32-bit output "00008000" (hexadecimal indication, i.e., the 16th bit from an MSB side is "1"), and the adder 64 adds the output of the multiplier 63 and the output of the selection circuit 65, so that the digit rounding operation of the multiplication result is performed.
On the other hand, when X and Y in two's complement numbers of 16 bits are only multiplied, the multiplier 63 obtains the multiplication result of the inputs X61 and Y62, the selection circuit 65 selects the 32-bit output "00000000" (hexadecimal indication) in response to the digit rounding selection signal 66, and the adder 64 adds the output of the multiplier 63 and the output of the selection circuit 65 to emit an operation result.
As aforementioned, in the prior art, for the digit rounding operation of the multiplication result, the multiplication result is once obtained, and "1" is added to a certain bit in the multiplication result, to round the digit.
Therefore, in addition to the multiplier 63, the adder 64 is necessary. After obtaining the multiplication result, addition is performed for the digit rounding. Such operation takes a longer time than the multiplication only.